angular.module('app', [])
	  .directive('mrRem', [function() {
        return {
            restrict: 'A',
            link: function($scope, iElm, iAttrs, controller) {
                var _size = 50;
                var p = (document.body && document
                    .body.clientWidth || document.getElementsByTagName("html")[0].offsetWidth) / 375;
                _size = p * 50;
                document.getElementsByTagName("html")[0].setAttribute("style", "font-size:" + _size + "px!important");
            }
        };
    }])
    .controller('MyController', ['$scope', function($scope) {
    	$scope.click1 = function(){
    		alert("alert弹框!");
    	};
    	$scope.click2 = function(){
    		var r=confirm("点击了2!");
    		if(r==true){
    			alert("你点击了确定!");
    		}else{
    			alert("你点击了取消!");
    		}
    	};
    	
    
    	$scope.androidCallJs = function(params){
    		alert("此方法是由原生调用的,传递来的参数是="+params);

    		return "返回值";
    	};
    }])
  
